#ifndef SocketException_class
#define SocketException_class

#include <iostream>
#include <string>
using namespace std;

class SocketException
{
	public:
		SocketException (string s) : emsg (s), file(__FILE__), func(__FUNCTION__) 
		{
			emsg += " [file: " + file + "] [func: " + func + "]";
		}
		~SocketException (){};
		/*virtual*/ string description() const
		{
			return emsg;
		}
	private:
		string emsg;
		string file;
		string func;
};

class BadConnection : public SocketException
{
	public:
		BadConnection(string s) : SocketException(s) {};
		~BadConnection() {};
		//virtual string description() const { return SocketException::description(); }
};

#endif
